#ifndef _DevicesNEC_H_
#define _DevicesNEC_H_

#define NEC_CODE_LOW_MIN    900
#define NEC_CODE_LOW_MAX    1300

#define NEC_CODE_HIGH_MIN   2000
#define NEC_CODE_HIGH_MAX   2400

#define NEC_CODE_HEAD_MIN   4900
#define NEC_CODE_HEAD_MAX   5300



typedef enum{
    necReset = 0,
    necSucceed,
    necReadUser,
    necReadControl,
    necReadData,
}NecStateEnum;




typedef struct{
    int8_t state;
    int8_t length;
    uint8_t user;
    uint8_t control;
    uint32_t data;
}NecCodeType;





extern NecCodeType g_typeNecDecode;



void vNecIRInit(void);
int8_t cNecDecode(NecCodeType *ptypeData, int16_t sValue);


#endif
